﻿@model MyPSDALayer.Article   
@using (Html.BeginForm("Create", "ManageArticles", FormMethod.Post, new { enctype = "multipart/form-data", id = "fileImgUrl" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>新增文章</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.ArticleName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ArticleName)
            @Html.ValidationMessageFor(model => model.ArticleName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.TypeName)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(m => m.TypeName, ViewBag.TypeList as SelectList)
            @Html.ValidationMessageFor(model => model.TypeName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISIndex)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(m => m.ISIndex)
            @Html.ValidationMessageFor(model => model.ISIndex)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISTop)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(mode => mode.ISTop)
            @Html.ValidationMessageFor(model => model.ISTop)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISTaobao)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(m => m.ISTaobao)
            @Html.ValidationMessageFor(model => model.ISTaobao)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISHot)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(m => m.ISHot)
            @Html.ValidationMessageFor(model => model.ISHot)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Summary)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(m => m.Summary)
            @Html.ValidationMessageFor(model => model.Summary)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.CoverUrl)
        </div>
        <div class="editor-file">
            @Html.FileUploadFor(m => m.CoverUrl)
            @Html.ValidationMessageFor(model => model.CoverUrl)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ArticleContent)
        </div>
        <div class="editor-field">
            @Html.UEditorFor(o => o.ArticleContent)
            @Html.ValidationMessageFor(model => model.ArticleContent)
        </div>
        <p>
            <input type="submit" value="保存" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
